//
//  TMScanResultController.m
//  国学商家管理
//
//  Created by Tao Li on 2018/6/20.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMScanResultController.h"
#import "TMScanResultView.h"
@interface TMScanResultController ()
@property(nonatomic, strong)TMScanResultView *resultView;
@end

@implementation TMScanResultController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.tableFooterView = [UIView new];
    self.title = @"扫码结果";
    self.resultView = [[NSBundle mainBundle] loadNibNamed:@"TMScanResultView" owner:self options:nil].lastObject;
    [self.view addSubview:self.resultView];
    self.resultView.frame = CGRectMake(0, 0, kWindowW, kWindowH-64);
    self.resultView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
    __weak typeof(self) safeSelf = self;
    self.resultView.scanBlock = ^{
        [safeSelf.resultView removeFromSuperview];
    };
}

@end
